package com.infocollect.project.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.infocollect.project.api.entity.TappMenuActionEntity;
import com.infocollect.project.api.req.TappMenuActionReq;
import com.infocollect.project.form.vo.R;

import java.util.List;

/**
 * 菜单动作
 */
public interface ITappMenuActionService extends IService<TappMenuActionEntity> {
    /**
     *保存菜单动作
     */
    R<String> addAction(TappMenuActionReq req);
    /**
     *保存菜单动作
     */
    R<String> eidtAction(TappMenuActionReq req);
    /**
     * 根据ID 获取按钮信息
     */
    TappMenuActionEntity getActionInfo(Long id);
    /**
     * 根据菜单ID 获取对应按钮权限
     */
    List<TappMenuActionEntity> getActionByMenuId(Long menuId);

    R<String> delAction(Long id);
    /**
     * 根据菜单ID和动作编码获取菜单动作信息
     * @param menuId
     * @param actionCode
     * @return
     */
    TappMenuActionEntity getActionByMenuIdActionCode(Long menuId,String actionCode);
}
